<template>
	<view class="wc-list">
		<view class="list-info">
			<block v-for="(item,index) in wenchuang_list" :key="index">
				<view class="list-item" @click="handleGoNewsDetail(item)">
					<image :src="item.listImage"></image>
					<text>{{item.title}}</text>
				</view>
			</block>
		</view>
		<view class="foot" :class="wenchuang_list.length < 5 ? 'foot-fixed' : ''">
			<footLogo></footLogo>
		</view>
	</view>
</template>

<script>
	import footLogo from "@/components/foot-logo/footLogo.vue"
	export default {
		components:{
			footLogo
		},
		data() {
			return {
				wenchuang_list:[]
			};
		},
		onLoad:function(option){
			this.getWCList()
		},
		methods:{
			getWCList:function(){
				let params = {
					channelType:this.pub.channelType,
					typeCode:'130003505' //走进文创
				}
				this.$postApi(this.$path.NEWS_LIST,params).then(res => {
					console.log("走进文创返回数据----------->",res.data)
					if(res.data.success){
						this.wenchuang_list = res.data.data.list
					}else{
						
					}
				})
			},
			handleGoNewsDetail:function(item){
				let id = item.id
				uni.navigateTo({
					url:'/pages/travelDetail/travelDetail?id=' + id +'&pages=news' ,
					animationType: 'pop-in',
					animationDuration: 200
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.wc-list{
		margin: 0;
		padding: 0;
		
		image {
			width: 100%;
			height: 100%;
		}
		min-height: 100%;
	}
	.list-info{
		padding: 20upx;
	}
	.list-item{
		height: 192upx;
		border-radius: 20upx;
		margin-top: 10upx;
		position: relative;
		
	}
	.list-item image{
		border-radius: 20upx;
	}
	.list-item text{
		position: absolute;
		bottom: 29upx;
		// width: 600upx;
		left: 37upx;
		font-size:34upx;
		font-family:PingFang SC;
		font-weight:bold;
		color:rgba(255,255,255,1);
		line-height:51upx;
		text-shadow:0px 3px 5px rgba(86,51,26,0.57);
		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
	}
	.foot{
		
		width: 100%;
		
	}
	.foot-fixed{
		position: fixed;
		bottom: 0;
	}
</style>
